fixing js so i can customize better