have most functions working