Refactor code and invoke on Submit Amount