add some input validation
Add first param parcing
add update all condition logic