cleanup logic and add spock test
add function for replacement cost over time
clean up