changed stmt ref to get or create