added original logic