fixes in algorithms and moldinam_basic