Some more functions
fixed merge conflicts