added funct keyword
added user defined function logic
removed a small bug in user defined functions
due to git error