q2b completed. needs testing and verifcation!!