the worst error checking