cleaned up a little, but still has compile errors