help with some math with a nice GUI