added sleeping part; kind of sorting things kind of okay