modified BasicOps.java