added return, completed function