replicated from grails01