working frontend code from code jam