Changed a few functions