Implement get function to obtain variables inside object