added tests and prepend
speed up