made it work, changed some variable names