calc fixed(exception handling added)