lots of stuff - should be faster now