some improvements with validation