ran astyle on code to make formatting consistent.