added logic to handle 14.04 and 14.10