Added RegE logic