begin doing the logic