added begin and define