updated mysql procedures