added get memory function
in hugely broken dev status