made correct functions