cleaned up js