implement my version of the functions