publish_algorithm method just writtten with no errors