still trying to fix functions...