still working through how to write reusable code. with this implementaion it rund fast but polt is not seperated from calculation