cleaned up WOL code