updated with functions"