some modification to get things to work nicely with gradle