moved some old code to folder for rewrite
finished smoother functions