added close method to app