my version of the functions