change parmaeter to selfcontained