using sqrt no longer causes crash

but it still doesn't work. need to figure out how to fit sqrt into code
designed for two operands