fix problem with multiple spaces, convert timestamp