creating helper for refresh method