assuming given functions work. balanced and later functions need work