updated some things to 1.8, refactoring