implement selector and painter