fix pointers as function arguments for easy use