add test, chain function and transform method