implemented all gc functions
add logging support