added funct keyword
added user defined function logic