moved methods to extensions class