added a functioning plot