moved closeable variable to constructor