refactored egg and hopefully will jiggle

unfortunately contains syntax errors