cleanup and make work with blad