added error directive to dry things up a little