adjusted with all methods of the js messy