add setters and getters and use pubsub