Removed generate_mac from helper