updated test cases and code... issues before this build