add prototypes
clean code