Added named functions (buggy)