#317.Apllied more clear solution for get_all_pointers method.