added preliminary functions