fixed issues 9, 10, 11