added proper block spawning and block synchronization