# adapted everything except math/ to changed code conventions