Now it works as before but with new main file