added sort of finished stuff with begin and end