Re-implementing in Express framework