algorithm spaces/indentation fix