improved accuracy, added sine squared