another gigantic commit full of improvements