refactored fragment and added scratch