need to fix order of scripts