capture inf. loop