functionality upgraded

fixed some basic issues