main functionality kind of working..