some posible refactoting