simple base36 implementation