update mostly all functions complete