added base converter function