in my spare time I'll try to implement this