server works with chrome but not firefox...cheap way of writing before read for now