updated with new tests, totally broken