added some useful methods + tests