cleaned up sequential computed code, now in seperate file