added in states and will start on javascript