implemented input type validation
tested value validation