function declaration parameter problems fixed