fixed delete blank lines, added some functions