added loc and ram functions