add calculation algorithm and show/hide animations