smartmax & smartmax_eps update from maxwen source