remove dependency on bc and use expr