divisibilty problem solved w/ some exception handling