make calculate and draw indipendent (finally)