cleanup fucntion a bit
stuff