updated to work with express 3x and 4x