changed a few functions.