fixed up and tested basics