added sin and cos functions, other could be implemented equally