Brain waves and their role in memory