The remainder of $1^2+3^2+5^2+7^2+\cdots+1013^2$ divided by $8$ How to find the remainder of $1^2+3^2+5^2+7^2+\cdots+1013^2$ divided by $8$

The sum is of the form 
$$\sum_{k=0}^{125}((8k+1)^2+(8k+3)^2+(8k+5)^2+(8k+7)^2)+((8.126+1)^2+(8.126+3)^2+(8.126+5)^2)$$
This above one is congruent to(mod 8),
$$(\sum_{k=0}^{125}((1)^2+(3)^2+(5)^2+(7)^2))+(1+3^2+5^2)$$
This is again congruent to,
$$(\sum_{k=0}^{125}(1+1+1+1))+(1+1+1)=126\times 4+3$$
This is congruent to ,
$3(\mod 8)$
This means it will leave a remainder of 3 when divided by 8.
