working on validation of contract

#53
fixed validation

#53