Added separate open() and close() functions