Change functions to protected