use Java observer interface to implements