added hints support and better label drawing