sine and cosine functions added.