added cell code, map code incomplete. untested