fixed formula added a test