updated to work in eclipse