edited code, added methods all on one line