call the function in a less retarded way