Added implementation of automatic detection of separator