calculate rows based on static values