added new scenarios, did refactoring