finsihed implementation of basic method, still artifacts