reworkign JS