use casting to free_pages