added 404 testing and refined input