add assert code and update create function