started writing tests
try to avoid divisions at runtime: small speed improvement