fixed multiple problem with pointer