solve bug with alternative method