most functions working