attach now chainable, can attach function or array of functons

Signed-off-by: Eric Lobdell <eric@ericlobdell.io>