Removed setCurrentUp, setCurrentDown etc. and replaced them with the setFunction method