added a get function for thread saftey