cleaned up the code, fixed bee, added stage D