made code more complete