Final changes to initial version
Added simple version that actually works