add memory loading for device