change from dfaoliveira fork