Added simple logic for letter calculation