tests done, works fine now