fix formatting and fix test