Refac and added subscription feature