added function def type checking for void, returns
fixed martins problems