modified problem code