Updating code to match latest express api