end instead of write