Remove repeated function definition