made create into function