Add some new functions and subfunctions