change return type of function to pointer const