move some logic into Drawable