f
Added error checking