corrected output to match specifications; works?