finally fixed it up to work