reworked js1 lab4