fix and clean funtionality added