fixed issues 1-5