fix bugs and handle computations more effectively