corrected for some typos and escaping in erb