bug fix. not complete. test is running