fixing the right funtion calls