lots of changes, hope this fixes it