added idea to reduce runtime