formating fixes
better error return