updated with most functions