2 of three functions working