added argument validation