Made it funtional.