simplified a bit for readability