fixing modules declaration, added memory usage