moved common methods from other class