Changed old functions with new functions