crofsock => implemented state machine engine