initial commint, add matlab implamentation