fixing functions' modifiers to improve the design of the code