code update regarding the comments posted