Reduce file size by 9 bytes by using cahced variable for window