merging changes from @gcollazo