updated test, reformatted code