removed relative offset for memory and added memory test