some improvements based on feedback