widget init and record