added grace support