figuring out investing time for each stage
second attempt
values look corect, need to test