renamed some functions to make stuff work