simplified a bit