improve code after review