implemented freezerfunction without waitqueues (for testing)