moves to switch statment
commit before merge with Dan's branch