Simplified codeg
preparing to write tests