partially solved exercise