bug fixes in second homework first task - swift