Bug fixed; serial algorithm is implemented