finish all non-member func