adding features and cleaining up