various fixes

bugfix in random range method, calc random range better, calculate
moving time in elevator and sleep in elevator
bugfix í method declaration
bla