reverted some changes manually, need to rewrite tests