updated Main bracket placement, added switch statement