added more possible code to the mid term JS