finish debugging, tested