made some changes...not working for 100%