began funtion