added terminating blocks