Added some logic to check abstract existence int he database