moved error handling again this time to a new errors.go file along with structs