added method for functions