use print instead of write