added resource not found handling and tests