adding Core code and testing code