updated functionality. See documentation