removed sessions and refactored hw2-2