added shallow option to attrs methods