final modification stuff - fixing bugs