fixed whitespace
reworked algorithm parser