also, i think it can maybe be simplified a little bit.