added new test and put code back into init