added trim to saveing values