made it functional