refixing mainjs