added requirements and catch exception