trace functionality added