refactoring done . repeated code removed