moved memory testing out to separate file