corrected server side code and test for packages