Methods for computing similarities among genes have attracted increasing attention for their applications in gene clustering, gene expression data analysis, protein interaction prediction and evaluation. To address the need for automatically computing functional similarities of genes, an important class of methods that computes functional similarities by comparing Gene Ontology (GO) annotations of genes has been developed. However, all of the currently available methods have some drawbacks; for example, they either ignore the specificity of the GO terms or do not consider the information contained within the GO structure. As a result, the existing methods perform weakly when the genes are annotated with 'shallow annotations'. Here, we propose a new method to compute functional similarities among genes based on their GO annotations and compare it with the widely-used G-SESAME method. The results show that the new method reliably distinguishes functional similarities among genes and demonstrate that the method is especially sensitive to genes with 'shallow annotations'. Moreover, our method has high correlations with sequence and EC similarities.