fixed issues 1-3