modded yau code to fit sleep data