added pre and post scripts