Added implementations from Jacek and test for them