tried to remove warning about a pointer cast