ternary for attribute assignments
connected method now used in remove connection to hide messy conditional