now it works perfectly, gotta implement those other two