working cook class.
added cook.class as synchronization object.