Added helpers and tests