changed widget to abstract class