minor additions, working on functions