Abstract behaviour to lib file