1.0

bug fixed and code cleaned up