modified the animate 'lightup' function to incorporate more information - buggy