rename to inputside algorithm