fix formatting and update to pass tests