weird js stuff happening - reverted