adding error checking in /get