fixing my lousy js