add working create function