Fixed

fixed variables and tested