removed casting to make the code more readable