rewritten with new, clear style