@Manoj: As per your comments I have remove the repetitive code and created h...