add json responses, change exceptions in dao