correct function constructor and print