attempted to simplify str handling