implemented basic funtionality