fixing logic with comment output of calculated values for pixels and percetnages