=extended functionality and some tests