maha | small re-fatorings