added attach functionality for subs if needed later