further refacto