readded some misplaced functions