simplifying by adding int sqrt