same as above, suggest to use template implementation.