returned pointer and renamed functions