finally got the type working, will write more extensive tests now