fixed some scripts
refactor