add support for function prototypes, normalize params