Fixed semicolon error and set function as public