changed validate to a http post