added functionality
big commit