Made code reusable