function declared incorrectly